﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterCarQuote.master" AutoEventWireup="true"
    CodeFile="car-details.aspx.cs" Inherits="car_insurance_car_details" Async="true"
    MaintainScrollPositionOnPostback="true" EnableEventValidation="false" ValidateRequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        // Load the SDK Asynchronously
        (function(d) {
            var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
            if (d.getElementById(id)) { return; }
            js = d.createElement('script'); js.id = id; js.async = true;
            js.src = "//connect.facebook.net/en_US/all.js";
            ref.parentNode.insertBefore(js, ref);
        } (document));

        // Init the SDK upon load
        window.fbAsyncInit = function() {
            FB.init({
                appId: '588487661283699', // App ID
                channelUrl: '//' + window.location.hostname + '/channel', // Path to your Channel File
                status: true, // check login status
                cookie: true, // enable cookies to allow the server to access the session
                xfbml: true  // parse XFBML
            });
        }

        function userLogin() {
            FB.login(function(response) {
                if (response.authResponse) {
                    // user has auth'd your app and is logged into Facebook
                    var access_token = response.authResponse.accessToken;
                    FB.api('/me?fields=id,name,email,first_name,last_name,gender,birthday,relationship_status', function(me) {
                        if (me.name) {
                            //parent.$.fancybox.close();
                            document.getElementById('<%= hiddenFacebookName.ClientID %>').value = me.name;
                            document.getElementById('<%= hiddenFacebookEmail.ClientID %>').value = me.email;
                            document.getElementById('<%= hiddenFacebookID.ClientID %>').value = me.id;

                            var a = document.getElementById("<%= lkFacebookLogin.ClientID %>");
                            var evObj = document.createEvent('MouseEvents');
                            evObj.initMouseEvent('click', true, true, window, 0, 0, 0, 1, 1, false, false, false, false, 0, null);
                            a.dispatchEvent(evObj);
                        }
                    })
                } else {
                    // user has not auth'd your app, or is not logged into Facebook
                }
            }, { scope: 'email,user_birthday,user_relationships' });
        }
    </script>
    <script type="text/javascript">
        setTimeout(function(){var a=document.createElement("script");
        var b=document.getElementsByTagName("script")[0];
        a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0030/4575.js?"+Math.floor(new Date().getTime()/3600000);
        a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
    <asp:UpdateProgress AssociatedUpdatePanelID="" ID="updateProgress" DynamicLayout="false"
        DisplayAfter="0" runat="server">
        <ProgressTemplate>
            <div class="loading-container">
                <img src="/images/loader/loader-yellow.gif" width="66" height="66" alt="ประกันรถชั้น1" /></div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <div id="divLoading" class="loading-container">
        <img src="/images/loader/loader-yellow.gif" width="66" height="66" alt="ประกันรถชั้น2" /></div>
    <div class="yellow-bg">
        <asp:HiddenField runat="server" ID="hdnIsPromo" Value="0" />
        <asp:HiddenField runat="server" ID="hdnURLFrom" Value="" />
        <div class="edit-nav" runat="server" id="divTopNavigation" visible="false">
            <div class="nav-col-1">
                <img src="/images/edit-profile.png" width="24" height="24" alt="ซื้อประกันรถยนต์" /></div>
            <div class="nav-col-2">
                <asp:HyperLink NavigateUrl="~/user/edit-profile?ResultTitle=201" ID="hplEditProfile"
                    runat="server" CssClass="edit-nav-links">
                    <asp:Label ID="lblUserName" Text="<%$Resources:General,EditProfile%>" runat="server"></asp:Label></asp:HyperLink>
            </div>
            <div class="nav-col-3">
                <img src="/images/save-quote.png" width="24" height="24" alt="เปรียบเทียบเบี้ยประกันรถหลายบริษัท" /></div>
            <div class="nav-col-4">
                <asp:HyperLink NavigateUrl="~/user/saved-quotes" ID="hplSavedQuotes" Text="<%$Resources:CarInsurance,SavedQuotes%>"
                    runat="server" CssClass="edit-nav-links"></asp:HyperLink>
            </div>
            <div class="nav-col-5">
                <img src="/images/change-pw.png" width="24" height="23" alt="ดูเบี้ยประกันรถ" /></div>
            <div class="nav-col-6">
                <asp:HyperLink NavigateUrl="~/user/change-password" ID="hplChangePassword" Text="<%$Resources:General,ChangePassword%>"
                    runat="server" CssClass="edit-nav-links"></asp:HyperLink>
            </div>
        </div>
        <div class="tab-container top20">
            <div class="steps-quote-bg">
                <div class="steps-quote">
                    <asp:Image ID="imgStep" runat="server" ImageUrl="<%$ Resources:ImageResource,ImgStep1Url%>"
                        Width="412" Height="123" alt="ราคาประกันรถยนต์" /></div>
                <div class="monkey-head">
                </div>
            </div>
        </div>
        <div class="radius-box-quote">
            <div class="monkey-hand">
                <img src="/images/img-monkey-hand.png" width="168" height="205" alt="ดูเบี้ยประกันรถหลายบริษัท" /></div>
            <div class="form-col">
                <div class="main-title-heading">
                <h1>
                    <%=GetGlobalResourceObject("General","GetCarQuotes") %></h1></div>
                <asp:UpdatePanel ID="upnlCarDetails" runat="server">
                    <ContentTemplate>
                        <div>
                            <asp:Label ID="lblMessage" runat="server"></asp:Label>
                            <asp:ValidationSummary ID="vsCarDetails" runat="server" ValidationGroup="carquote"
                                ShowSummary="True" HeaderText="<%$ Resources:General,RequiredValidation%>" CssClass="error-msg" />
                        </div>
                        <div class="promo-row">
                            <asp:DropDownList ID="ddlManufactYear" runat="server" CssClass="input-fields-dropdown">
                                <asp:ListItem Text="<%$Resources:General,SelectCarYear%>" Value="-1" />
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="rfvManufactYear" ControlToValidate="ddlManufactYear"
                                CssClass="validationError" runat="server" ValidationGroup="carquote" ErrorMessage=""
                                InitialValue="-1"></asp:RequiredFieldValidator>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div class="promo-row">
                    <asp:DropDownList ID="ddlCarMake" runat="server" CssClass="input-fields-dropdown">
                        <asp:ListItem Text="<%$Resources:General,SelectCarMake%>" Value="-1" />
                    </asp:DropDownList>
                    <input type="text" id="hidCarMake" runat="server" style="display: none;" value="-1" />
                    <input type="text" id="hidCarMakeName" runat="server" style="display: none;" value="" />
                    <asp:RequiredFieldValidator ID="rfvCarMake" ControlToValidate="hidCarMake" runat="server"
                        CssClass="validationError" ValidationGroup="carquote" ErrorMessage="" InitialValue="-1"></asp:RequiredFieldValidator>
                </div>
                <div class="promo-row">
                    <asp:DropDownList ID="ddlModelBodyCCDoor" runat="server" CssClass="input-fields-dropdown">
                        <asp:ListItem Text="<%$Resources:General,SelectCarModel%>" Value="-1" />
                    </asp:DropDownList>
                    <input type="text" id="hidModelBodyCCDoor" runat="server" style="display: none;"
                        value="-1" />
                    <input type="text" id="hidModelBodyCCDoorName" runat="server" style="display: none;"
                        value="" />
                    <asp:RequiredFieldValidator ID="rfvModelBodyCCDoor" ControlToValidate="hidModelBodyCCDoor"
                        CssClass="validationError" runat="server" ValidationGroup="carquote" ErrorMessage=""
                        InitialValue="-1"></asp:RequiredFieldValidator>
                    <asp:Label Visible="false" runat="server" ID="lblModelDesc" />
                    <asp:Label runat="server" ID="lblCarVehicleType" Text="" Visible="false" />
                    <div style="display: none;">
                        <asp:Label runat="server" ID="lblSumInsured" Text="0" Visible="false" />
                        <asp:TextBox ID="txtSumInsured" Visible="false" MaxLength="9" Width="80px" runat="server" />
                        <asp:TextBox ID="txtNewSumInsured" Visible="false" MaxLength="9" Width="80px" runat="server" />
                        <asp:TextBox ID="txtGroupNo" Visible="false" Text="-1" MaxLength="2" Width="30px"
                            runat="server" />
                    </div>
                </div>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <div class="promo-row">
                            <%--<div style="float: left;">--%>
                                <asp:Button runat="server" ID="btnCallforDiscount" CssClass="call-back-btn-cq" style="height:40px; width:150px; padding-left:30px;"
                                        Text="<%$Resources:CarInsuranceResultPage,CallBack %>" ToolTip="<%$ Resources:General,CarNotfoundLetusCallBack%>"  />                        
                            <%--</div>--%>
                            <div style="float: right;">
                                <asp:Button ID="btnGetaQuote" Text="<%$ Resources:Home,GetQuote%>" runat="server" style="height:40px; width:150px;"
                                    Width="180" CssClass="action-button" OnClick="btnGetaQuote_Click" OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();CheckCookie();if (Page_ClientValidate('carquote')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}"
                                    ToolTip="<%$ Resources:Home,GetQuote%>" ValidationGroup="carquote" /></div>
                            <div style="float: left; padding-top: 10px; font-size: 12px; width: 100%;">
                                <%=GetGlobalResourceObject("CarInsurance", "RedPlateCallBack")%>
                                <asp:HyperLink ID="hplCallforDiscount" runat="server"><%=GetGlobalResourceObject("CarInsurance", "ClickHere")%></asp:HyperLink>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <div class="car-col top20">
                <div id="divCarQuoteNormal" runat="server" visible="true">
                    <div class="steps-bg">
                        <div class="steps-title ">
                            <asp:Label ID="lblInteractMessageHeader" runat="server"></asp:Label>
                        </div>
                        <div class="steps-box">
                            <div class="year-grey" id="divInteractCarYear" runat="server">
                                <asp:Label ID="lblInteractCarYear" runat="server" Text="<%$ Resources:General,Year%>"></asp:Label></div>
                            <div class="car-brand-tab" id="divInteractCarBrand" runat="server">
                                <div class="car-brand-grey" id="divInteractCarBrandInner1" runat="server">
                                    <asp:Label ID="lblInteractCarBrand" runat="server" Text="<%$ Resources:General,CQCarMake%>"></asp:Label></div>
                                <div class="amount-grey" id="divInteractCarBrandInner2" runat="server">
                                    <asp:Label ID="lblInteractMatches" runat="server"></asp:Label></div>
                            </div>
                            <div class="car-model" id="divInteractMessage" runat="server" style="visibility: hidden;">
                                <asp:Label ID="lblInteractMessage" runat="server"></asp:Label></div>
                        </div>
                        <div class="steps-box" style="display: none;">
                            <asp:Label ID="lblSteps" runat="server"></asp:Label>
                        </div>
                    </div>
                    <div class="steps-box-outline top10">
                        <div class="brand-logo">
                            <div id="divMotorBrand" runat="server" class="gluaygluay">
                            </div>
                        </div>
                        <div class="steps-tx">
                            <div class="steps-amount">
                                <div class="tx-no">
                                    <span class="tx-quotes">
                                        <%=GetGlobalResourceObject("General", "CQQuotes1")%>
                                    </span>
                                    <asp:Label ID="lblQuotes" runat="server"></asp:Label>
                                    <span class="tx-quotes">
                                        <%=GetGlobalResourceObject("General", "CQQuotes2")%>
                                    </span>
                                </div>
                                <div class="tx-bold top10">
                                    <asp:Label ID="lbl30Days" runat="server"></asp:Label>
                                    <asp:Label ID="lblQuoteCar" runat="server" Visible="false"></asp:Label></div>
                            </div>
                            <div>
                                <asp:Image ID="ImgQuoteGet" runat="server" ImageUrl="<%$ Resources:ImageResource,ImgQuoteGet%>"
                                    Width="<%$ Resources:ImageResource,ImgQuoteGetSize%>" Height="79" alt="เปรียบเทียบราคาประกันรถยนต์" /></div>
                        </div>
                    </div>
                </div>
                <div id="divCNYPromotion" runat="server" visible="false">
                    <div class="cny-bg">
                        <div class="top">
                            <div class="cny-heading">
                                <span>
                                    <%=GetGlobalResourceObject("Home", "SlidHeadCNYMessage1")%></span><br />
                                <span style="color: #ed4e2f">
                                    <%=GetGlobalResourceObject("Home", "SlidHeadCNYMessage2")%>*</span>
                            </div>
                        </div>
                        <div class="bottom">
                            <div class="cny-body-tx">
                                *<%=GetGlobalResourceObject("Home", "TermsConditionsApply")%><br />
                                -
                                <%=GetGlobalResourceObject("Home", "SlidCNYTerms1")%><br />
                                -
                                <%=GetGlobalResourceObject("Home", "SlidCNYTerms2")%><br />
                                -
                                <%=GetGlobalResourceObject("Home", "SlidCNYTerms3")%>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="quote-logo-col" style="padding-left: 35px;">
                    <div style="float: left; margin-top: 10px;">
                        <img src="/images/logos/oic.jpg" width="124" height="56" alt="ใบอนุญาติทำประกันภัยรถยนต์ คปภ." /></div>
                    <div style="float: left; margin-top: 10px;">
                        <img src="/images/logos/dbd.jpg" width="96" height="56" alt="ประกันรถออนไลน์" />
                    </div>
                    <div style="float: left; margin-top: 15px; padding-left: 10px;">
                        <!--- Secure Site Seal - DO NOT EDIT --->
                        <span id="ss_img_wrapper_115-55_image_en"><a href="http://www.alphassl.com/ssl-certificates/wildcard-ssl.html"
                            target="_blank" title="SSL Certificates">
                            <img alt="Wildcard SSL Certificates" border="0" id="ss_img" src="//seal.alphassl.com/SiteSeal/images/alpha_noscript_115-55_en.gif"
                                title="SSL Certificate"></a></span><script type="text/javascript" src="//seal.alphassl.com/SiteSeal/alpha_image_115-55_en.js"></script><script
                                    type="text/javascript" src="//seal.alphassl.com/SiteSeal/alpha_image_115-55_en.js"></script>

                        <!--- Secure Site Seal - DO NOT EDIT --->
                    </div>
                </div>
            </div>
        </div>
        <div>
            <cc1:ModalPopupExtender ID="mpeUserLogin" runat="server" TargetControlID="lnkbtnSignin"
                PopupControlID="pnModelPopup" BehaviorID="behCallMepop" DropShadow="false" CancelControlID="btnCancel"
                BackgroundCssClass="simplemodal-overlay">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="pnModelPopup" runat="server" Style="display: none;">
                <!-- modal content -->
                <div id="simplemodal-container">
                    <%--<div id="basic-modal-content">--%>
                    <div class="pop-col">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <div class=" text-heading-black">
                                    <%=GetGlobalResourceObject("General", "EnterDetails")%>
                                </div>
                                <div>
                                    <asp:Label ID="lblCarModelName" runat="server"></asp:Label><br />
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <div style="width: 440px; height: 30px;">
                            <asp:ValidationSummary ID="vsUserDetails" runat="server" ValidationGroup="userlogin"
                                ShowSummary="True" HeaderText="<%$ Resources:General,RequiredValidation%>" CssClass="error-msg" Height="40px" />
                            <br />
                        </div>
                        <div class="cb-box">
                            <asp:UpdatePanel ID="upnlUserLogindetails" runat="server">
                                <ContentTemplate>
                                    <div class="cb-row-1">
                                        <asp:Label ID="Label1" runat="server" Text="<%$ Resources:CarInsurance,Name%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox ID="txtUserName" CssClass="cb-fields" runat="server" MaxLength="100"></asp:TextBox>
                                        <cc1:TextBoxWatermarkExtender ID="tbwUserName" runat="server" TargetControlID="txtUserName"
                                            WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterName%>">
                                        </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvUserName" runat="server" Text="" CssClass="validationError"
                                            ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserName" Display="Dynamic"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revUserName" Text="" CssClass="validationError"
                                            runat="server" ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserName"
                                            ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" Display="Dynamic"></asp:RegularExpressionValidator>
                                    </div>
                                    <div class="cb-row-1">
                                        <asp:Label ID="lblUserEmail" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox ID="txtUserEmail" CssClass="cb-fields" runat="server" MaxLength="100"></asp:TextBox>
                                        <div style="float: right; margin-top: 7px;">
                                            <a id="A2" runat="server" class="tooltips2">
                                                <img src="/images/lock.png" alt="ssl" width="25" height="25" /></a>
                                        </div>
                                        <cc1:TextBoxWatermarkExtender ID="tbwUserEmail" runat="server" TargetControlID="txtUserEmail"
                                            WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterEmail%>">
                                        </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvUserEmail" runat="server" Text="" CssClass="validationError"
                                            ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserEmail"
                                            Display="Dynamic"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revUserEmail" Text="" CssClass="validationError"
                                            runat="server" ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserEmail"
                                            ValidationExpression="(\w*([a-zA-Z]|([a-zA-Z]\w+))([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)|((\w*([-+.'])\w*([a-zA-Z]|([a-zA-Z]\w+)))*@\w+([-.]\w+)*\.\w+([-.]\w+)*)|(\d{2,4}@gmail.com)" Display="Dynamic"></asp:RegularExpressionValidator>
                                            <%--ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>--%>
                                    </div>
                                    <div class="cb-row-1">
                                        <asp:Label ID="lblUserMobileNo" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox runat="server" ID="txtUserMobile" CssClass="cb-fields" MaxLength="10"></asp:TextBox>
                                        <input type="text" id="hidUserMobile" runat="server" style="display: none;" value="" />
                                        <div style="float: right; margin-top: 7px;">
                                            <a id="A1" runat="server" class="tooltips2">
                                                <img src="/images/lock.png" alt="ssl" width="25" height="25" /></a>
                                        </div>
                                        <cc1:TextBoxWatermarkExtender ID="tbwUserMobile" runat="server" TargetControlID="txtUserMobile"
                                            WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,MobileExample%>">
                                        </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvUserMobile" runat="server" ControlToValidate="txtUserMobile"
                                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="userlogin"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revUserMobile" runat="server" ControlToValidate="txtUserMobile"
                                            CssClass="validationError" ErrorMessage="" ValidationExpression="0[5-9]\d{8}"
                                            ValidationGroup="userlogin"></asp:RegularExpressionValidator>
                                    </div>
                                    <%--<div style="padding-left: 145px; padding-bottom: 10px; font-size: 11px; text-align: left;">
                                            <%=GetGlobalResourceObject("General", "MobileExample")%></div>--%>
                                    <div class="cb-row-full">
                                        <asp:CheckBox ID="checkIsAgreement" runat="server" Checked="true" onclick="CheckedChanged();" />
                                        <asp:Label ID="lblAgreement" runat="server" Text="<%$ Resources:General,Agreement%>"
                                            CssClass="check-agree-text"></asp:Label>
                                        <asp:RequiredFieldValidator ID="rfvIsAccept" runat="server" ControlToValidate="txtIsAccept"
                                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="userlogin"></asp:RequiredFieldValidator>
                                        <div style="display:none;">
                                            <asp:TextBox ID="txtIsAccept" runat="server"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="cb-row-full">
                                        <div>
                                            <asp:Button ID="btnViewResultsNow" ValidationGroup="userlogin" Text="<%$Resources:General,ViewResults%>"
                                                Width="200" runat="server" CssClass="action-button" OnClick="btnViewResultsNow_Click"
                                                OnClientClick="LoadValidationErrorCss(); CheckedChanged();if (Page_ClientValidate('userlogin')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                                            <asp:HiddenField ID="hdnUserId" runat="server" Value="0" />
                                            <div id="divFacebookSignin" style="padding-top: 5px;">
                                                <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="userLogin(); return false;">
                                    <%--<img src='<%$ Resources:ImageResource,ImgLoginFB%>' alt="" width="180" height="35" style="padding-bottom:10px;" />--%>
                                    <asp:Image ID="imgFB" runat="server" AlternateText="นายหน้าประกันรถยนต์" width="180" height="35" style="padding-bottom:10px;"
                                        ImageUrl='<%$ Resources:ImageResource,ImgLoginFB%>' />
                                    </asp:LinkButton>
                                                <asp:LinkButton ID="lkFacebookLogin" runat="server" CausesValidation="false" OnClick="lkFacebookLogin_Click"
                                                    Style="display: none;"></asp:LinkButton>
                                                <asp:HiddenField ID="hiddenFacebookName" runat="server" />
                                                <asp:HiddenField ID="hiddenFacebookEmail" runat="server" />
                                                <asp:HiddenField ID="hiddenFacebookID" runat="server" />
                                            </div>
                                        </div>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </div>
                    <div class="pop-col-right-2">
                        <asp:UpdatePanel ID="upPopupResult" runat="server" Visible="true">
                            <ContentTemplate>
                                <div class="bubble-heading-2">
                                    <span style="color: #cd0b00; font-size: 20px; font-weight: bold;">
                                        <asp:Label ID="lblResultCount" runat="server" Text=""></asp:Label>
                                    </span>
                                    <asp:Label ID="lblPopupResultMessage1" runat="server" Text="<%$ Resources:CarInsurance,PopupResultMessage1%>"></asp:Label>
                                    <br />
                                    <asp:Label ID="lblPopupResultMessage2" runat="server" Text="<%$ Resources:CarInsurance,PopupResultMessage2%>"></asp:Label>
                                    <span style="color: #cd0b00; font-size: 20px; font-weight: bold;">
                                        <asp:Label ID="lblInsurerCount" runat="server" Text=""></asp:Label>
                                    </span>
                                    <asp:Label ID="lblPopupResultMessage3" runat="server" Text="<%$ Resources:CarInsurance,PopupResultMessage3%>"></asp:Label></div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                    <div style="float: right;">
                        <asp:ImageButton ID="btnCancel" runat="server" CssClass="modalCloseImg" ImageUrl="/images/close.png"
                            AlternateText="X" /></div>
                </div>
            </asp:Panel>
        </div>
        <div style="display: none;">
            <asp:LinkButton ID="lnkbtnSignin" runat="server" Text="Signin"></asp:LinkButton></div>
    </div>
    <div class="tab-container">
        <div class="twelve columns margin-bottom">
            <div class="heading-sub-title top20 center">
                <%=GetGlobalResourceObject("General", "PromotionDecision")%><br />
                <%=GetGlobalResourceObject("General", "AfterGetQuote")%></div>
            <div class="top20">
                <img src="/images/circles.jpg" alt="ใบเสนอราคาประกันรถยนต์" height="130" width="1000" /></div>
            <div class="circles top20">
                <div class="circles-col-1">
                    <%=GetGlobalResourceObject("General", "PromotionDecision1")%>
                </div>
                <div class="circles-col-2">
                    <%=GetGlobalResourceObject("General", "PromotionDecision2")%>
                </div>
                <div class="circles-col-3">
                    <%=GetGlobalResourceObject("General", "PromotionDecision3")%>
                </div>
                <div class="circles-col-4">
                    <%=GetGlobalResourceObject("General", "PromotionDecision4")%>
                </div>
            </div>
        </div>
    </div>
    <div class="intro-container-bg">
        <div class="tab-container top30">
            <div class="center">
                <img src="/images/img-getquote-para.jpg" width="751" height="500" alt="เทียบราคาเบี้ยประกันรถ" /></div>
            <div>
                <div class="two left">
                </div>
                <div class="eight left centered top20">
                    <div class="heading-sub-title center">
                        <%=GetGlobalResourceObject("General", "CQVoluntaryInsurance")%></div>
                    <div class="center">
                        <%=GetGlobalResourceObject("General", "CQVoluntaryMessage")%>
                    </div>
                </div>
                <div class="two left">
                </div>
                <div class="twelve left top20">
                    <div class="six left ">
                        <div class="margin">
                            <div class=" vol-insur2">
                                <strong>
                                    <%=GetGlobalResourceObject("General", "CQVoluntaryType1")%></strong>
                                <br />
                                <%=GetGlobalResourceObject("General", "CQVoluntaryType1Message")%></div>
                        </div>
                    </div>
                    <div class="six left ">
                        <div class="margin">
                            <div class=" vol-insur2">
                                <strong>
                                    <%=GetGlobalResourceObject("General", "CQVoluntaryType2")%></strong>
                                <br />
                                <%=GetGlobalResourceObject("General", "CQVoluntaryType2Message")%></div>
                        </div>
                    </div>
                </div>
                <div class="twelve left top20">
                    <div class="six left">
                        <div class="margin">
                            <div class=" vol-insur2">
                                <strong>
                                    <%=GetGlobalResourceObject("General", "CQVoluntaryType3")%></strong>
                                <br />
                                <%=GetGlobalResourceObject("General", "CQVoluntaryType3Message")%></div>
                        </div>
                    </div>
                    <div class="six left ">
                        <div class="margin">
                            <div class=" vol-insur2">
                                <strong>
                                    <%=GetGlobalResourceObject("General", "CQVoluntaryType4")%></strong>
                                <br />
                                <%=GetGlobalResourceObject("General", "CQVoluntaryType4Message")%></div>
                        </div>
                    </div>
                </div>
                <div class="six left top20 bottom-20">
                    <div class="margin">
                        <div class=" vol-insur2">
                            <strong>
                                <%=GetGlobalResourceObject("General", "CQVoluntaryType5")%></strong>
                            <br />
                            <%=GetGlobalResourceObject("General", "CQVoluntaryType5Message")%></div>
                    </div>
                </div>โ
            </div>
        </div>
    </div>
    <div class="tab-container">
        <div class="twelve left top20 bottom-20">
            <div class="center">
                <img src="/images/img-chac-whale-car.jpg" width="522" height="150" alt="เช็คราคาประกันรถยนต์" /></div>
            <table border="0" cellspacing="3" cellpadding="5" width="100%" style="border: 2px solid #FFD800;">
                <tr>
                    <td width="127" rowspan="2" align="left" valign="middle">
                        <strong>
                            <%=GetGlobalResourceObject("General", "CQInsuranceType")%></strong>
                    </td>
                    <td width="221" height="25" colspan="2" align="center" valign="middle" bgcolor="#FFD800">
                        <strong>
                            <%=GetGlobalResourceObject("General", "CQ3rdPartyLiability")%></strong>
                    </td>
                    <td width="220" height="25" colspan="2" align="center" valign="middle" bgcolor="#FFD800">
                        <strong>
                            <%=GetGlobalResourceObject("General", "CQInsuredVehicle")%></strong>
                    </td>
                </tr>
                <tr>
                    <td width="109" height="25" align="center" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQBodilyInjury")%>
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQPropertyDamage")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQFireTheft")%>
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQOwnDamage")%>
                    </td>
                </tr>
                <tr>
                    <td width="127" height="25" align="left" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQV1")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่ารักษาพยาบาล" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายต่อทรัพย์สิน" />
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันรถไฟไหม้ ขโมย" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายผู้เอาประกัน" />
                    </td>
                </tr>
                <tr>
                    <td width="127" height="25" align="left" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQV2")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่ารักษาพยาบาล" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายต่อทรัพย์สิน" />
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันรถไฟไหม้ ขโมย" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                    </td>
                </tr>
                <tr>
                    <td width="127" height="25" align="left" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQV3")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่ารักษาพยาบาล" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายต่อทรัพย์สิน" />
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                    </td>
                </tr>
                <tr>
                    <td width="127" height="25" align="left" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQV4")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายต่อทรัพย์สิน" />
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                    </td>
                </tr>
                <tr>
                    <td width="127" height="25" align="left" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQV5")%>
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่ารักษาพยาบาล" />
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายต่อทรัพย์สิน" />
                    </td>
                    <td width="109" height="25" align="center" valign="middle">
                        <%=GetGlobalResourceObject("General", "CQOptional")%>
                    </td>
                    <td width="111" height="25" align="center" valign="middle">
                        <img width="18" height="17" src="/images/ico-tick.gif" alt="ประกันค่าเสียหายผู้เอาประกัน" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="tab-container ">
        <div class="get-quote-bg margin">
            <div class="eight right">
                <p>
                    <%=GetGlobalResourceObject("General", "CQAdditional")%></p>
                <ul>
                    <li>
                        <%=GetGlobalResourceObject("General", "CQPALossLife")%></li>
                    <li>
                        <%=GetGlobalResourceObject("General", "CQMedicalExpenses")%></li>
                    <li>
                        <%=GetGlobalResourceObject("General", "CQBailBond")%></li>
                </ul>
                <p>
                    <%=GetGlobalResourceObject("General", "CQInsuranceTypeDetails")%></p>
                <ul>
                    <li>
                        <%=GetGlobalResourceObject("General", "CQFirstLoss3rdParty")%></li>
                    <li>
                        <%=GetGlobalResourceObject("General", "CQFirstLossOwnDamage")%></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="pay-ch-bg">
        <div class="payment-channels">
            <div class="text-heading-black">
                <%=GetGlobalResourceObject("Master", "PaymentChannels")%></div>
            <div class="payment-channels">
                <img src="/images/payment-channel.jpg" alt="ช่องทางการจ่ายค่าเบี้ยประกันรถ" height="59" width="979" /></div>
        </div>
    </div>

    <script type="text/javascript">
        function CheckCookie() {

            if (readCookie("GGQuote") == null) {
                document.getElementById("<%=txtUserName.ClientID%>").className = "cb-fields";
                document.getElementById("<%=txtUserMobile.ClientID%>").className = "cb-fields";
                document.getElementById("<%=txtUserEmail.ClientID%>").className = "cb-fields";
            }
            else {
                document.getElementById("<%=txtUserName.ClientID%>").className = "cb-fields-disable";
                document.getElementById("<%=txtUserMobile.ClientID%>").className = "cb-fields-disable";
                document.getElementById("<%=txtUserEmail.ClientID%>").className = "cb-fields-disable";
            }
        }
        function readCookie(name) {
            var nameEQ = name + "=";
            var ca = document.cookie.split(';');
            for (var i = 0; i < ca.length; i++) {
                var c = ca[i];
                while (c.charAt(0) == ' ') c = c.substring(1, c.length);
                if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
            }
            return null;
        }

        function CheckedChanged() {
            var ctrlTxt = document.getElementById('<%=txtIsAccept.ClientID %>');
            var ctrlAgree = document.getElementById('<%=checkIsAgreement.ClientID %>');
            var lblAgree = document.getElementById('<%=lblAgreement.ClientID %>');
            ctrlTxt.value = '1';
            lblAgree.setAttribute("class", "check-agree-text");
            if (ctrlAgree.checked == false) {
                ctrlTxt.value = '';
                lblAgree.setAttribute("class", "check-agree-text validationError");
            }
        }
    </script>

    <script type="text/javascript">
        $(document).ready(function() {
            $('#divLoading').hide();
            $('#<%=ddlCarMake.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarMake")%>' + '</option>');
            $('#<%=ddlModelBodyCCDoor.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarModel")%>' + '</option>');
            var ispromo = $('#<%=hdnIsPromo.ClientID%>').val();
            if (ispromo == "1") {
                $('#simplemodal-container').css("background-image", "url(/images/cny-promo-bg.jpg)");
            }
            initUI();
        })
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(function() {
            initUI();
        });
        function initUI() {
            $('#<%=ddlManufactYear.ClientID %>').change(function() {
                $('#divLoading').show();

                //set value to hiddenfield
                $('#<%=hidCarMake.ClientID%>').val('-1');
                $('#<%=hidCarMakeName.ClientID%>').val('');

                $('#<%=hidModelBodyCCDoor.ClientID%>').val('-1');
                $('#<%=hidModelBodyCCDoorName.ClientID%>').val('');

                if ($(this).val() != "-1") {
                    var selectedyear = $('#<%=ddlManufactYear.ClientID%>').val();
                    var selectedcarmake = '-1';
                    var selectedcarmodel = '-1';
                    $('#<%=ddlModelBodyCCDoor.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarModel")%>' + '</option>');
                    $.ajax({
                        type: "POST",
                        url: '<%= ConfigurationManager.AppSettings["TH.HostName"].ToString()%>' + 'car-insurance/get-car-details.asmx/GetCarMakeList',
                        data: "{'Year':'" + selectedyear + "', 'CarMake': '" + selectedcarmake + "', 'CarModel': '" + selectedcarmodel + "'}",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        success: function(msg) {
                            var j = jQuery.parseJSON(msg.d);
                            var options;
                            options = '<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarMake")%>' + '</option>';
                            for (var i = 0; i < j.length; i++) {
                                options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'
                            }
                            $('#<%=ddlCarMake.ClientID %>').html(options);
                            $('#<%=lblQuotes.ClientID %>').text(j[0].quoteCount);
                            $('#<%=divMotorBrand.ClientID %>').removeClass().addClass(j[0].carBrand);

                            //set message
                            $('#<%=lblInteractMessageHeader.ClientID %>').text('');
                            $('#<%=lblInteractCarYear.ClientID %>').text($('#<%=ddlManufactYear.ClientID%>').val());
                            $('#<%=lblInteractCarBrand.ClientID %>').text('<%=GetGlobalResourceObject("General", "CQCarMake")%>');
                            $('#<%=lblInteractMatches.ClientID %>').html('<%=GetGlobalResourceObject("General", "CQFound")%>' + " <b>0</b> " + '<%=GetGlobalResourceObject("General", "CQMatches")%>');
                            $('#<%=divInteractCarYear.ClientID %>').removeClass().addClass('year');
                            $('#<%=divInteractCarBrandInner1.ClientID %>').removeClass().addClass('car-brand-grey');
                            $('#<%=divInteractCarBrandInner2.ClientID %>').removeClass().addClass('amount-grey');
                            $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '0');

                            $('#divLoading').hide();
                        },
                        error: function(data) {
                            alert('Network connection failed. Please try again!')
                        }
                    });
                }
                else {
                    //set message
                    $('#<%=ddlCarMake.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarMake")%>' + '</option>');
                    $('#<%=ddlModelBodyCCDoor.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarModel")%>' + '</option>');

                    $('#<%=lblInteractMessageHeader.ClientID %>').text('<%=GetGlobalResourceObject("General", "CQSelectCarYear")%>');
                    $('#<%=lblInteractCarYear.ClientID %>').text('<%=GetGlobalResourceObject("General", "Year")%>');
                    $('#<%=lblInteractCarBrand.ClientID %>').text('<%=GetGlobalResourceObject("General", "CQCarMake")%>');
                    $('#<%=lblInteractMatches.ClientID %>').html('<%=GetGlobalResourceObject("General", "CQFound")%>' + " <b>0</b> " + '<%=GetGlobalResourceObject("General", "CQMatches")%>');
                    $('#<%=lblInteractMessage.ClientID %>').text('');
                    $('#<%=divInteractCarYear.ClientID %>').removeClass().addClass('year-grey');
                    $('#<%=divInteractCarBrandInner1.ClientID %>').removeClass().addClass('car-brand-grey');
                    $('#<%=divInteractCarBrandInner2.ClientID %>').removeClass().addClass('amount-grey');
                    $('#<%=divInteractMessage.ClientID %>').removeAttr("style").css('visibility', 'hidden');
                    $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '0');

                    $('#divLoading').hide();
                }
            });
        }
        $('#<%=ddlCarMake.ClientID %>').change(function() {
            $('#divLoading').show();

            //set value to hiddenfield
            $('#<%=hidModelBodyCCDoor.ClientID%>').val('-1');
            $('#<%=hidModelBodyCCDoorName.ClientID%>').val('');

            if ($(this).val() != "-1") {
                var selectedyear = $('#<%=ddlManufactYear.ClientID%>').val();
                var selectedcarmake = $('#<%=ddlCarMake.ClientID%>').val();
                var selectedcarmodel = $('#<%=ddlModelBodyCCDoor.ClientID%>').val();
                $.ajax({
                    type: "POST",
                    url: '<%= ConfigurationManager.AppSettings["TH.HostName"].ToString()%>' + 'car-insurance/get-car-details.asmx/GetCarModelDescList',
                    data: "{'Year':'" + selectedyear + "', 'CarMake': '" + selectedcarmake + "', 'CarModel': '" + selectedcarmodel + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(msg) {
                        var j = jQuery.parseJSON(msg.d);
                        var options;
                        options = '<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarModel")%>' + '</option>';
                        for (var i = 0; i < j.length; i++) {
                            options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'
                        }
                        $('#<%=ddlModelBodyCCDoor.ClientID %>').html(options);
                        $('#<%=lblQuotes.ClientID %>').text(j[0].quoteCount);
                        $('#<%=divMotorBrand.ClientID %>').removeClass().addClass(j[0].carBrand);

                        //set value to hiddenfield
                        $('#<%=hidCarMake.ClientID%>').val($('#<%=ddlCarMake.ClientID%>').val());
                        var carmakename = $('#<%=ddlCarMake.ClientID%>' + ' option:selected').text();
                        $('#<%=hidCarMakeName.ClientID%>').val(carmakename);

                        $('#<%=ddlCarMake.ClientID%>').removeClass("validationError");

                        //set message
                        $('#<%=lblInteractCarBrand.ClientID %>').text($('#<%=ddlCarMake.ClientID%> option:selected').text());
                        $('#<%=lblInteractMatches.ClientID %>').html('<%=GetGlobalResourceObject("General", "CQFound")%>' + " <b>" + ($('#<%=ddlModelBodyCCDoor.ClientID%> option').size() - 1) + "</b> " + '<%=GetGlobalResourceObject("General", "CQMatches")%>');
                        $('#<%=lblInteractMessage.ClientID %>').text('');
                        $('#<%=divInteractCarBrandInner1.ClientID %>').removeClass().addClass('car-brand');
                        $('#<%=divInteractCarBrandInner2.ClientID %>').removeClass().addClass('amount');
                        $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '0');

                        $('#divLoading').hide();
                    },
                    error: function(data) {
                        alert('Network connection failed. Please try again!')
                    }
                });
            }
            else {
                //set value to hiddenfield
                $('#<%=hidCarMake.ClientID%>').val('-1');
                $('#<%=hidCarMakeName.ClientID%>').val('');

                //set message
                $('#<%=ddlModelBodyCCDoor.ClientID %>').empty().append('<option value="-1">' + '<%=GetGlobalResourceObject("General", "SelectCarModel")%>' + '</option>');

                $('#<%=lblInteractCarBrand.ClientID %>').text('<%=GetGlobalResourceObject("General", "CQCarMake")%>');
                $('#<%=lblInteractMatches.ClientID %>').html('<%=GetGlobalResourceObject("General", "CQFound")%>' + " <b>0</b> " + '<%=GetGlobalResourceObject("General", "CQMatches")%>');
                $('#<%=lblInteractMessage.ClientID %>').text('');
                $('#<%=divInteractCarBrandInner1.ClientID %>').removeClass().addClass('car-brand-grey');
                $('#<%=divInteractCarBrandInner2.ClientID %>').removeClass().addClass('amount-grey');
                $('#<%=divInteractMessage.ClientID %>').removeAttr("style").css('visibility', 'hidden');
                $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '0');

                $('#divLoading').hide();
            }
        });
        $('#<%=ddlModelBodyCCDoor.ClientID %>').change(function() {

            if ($(this).val() != "-1") {
                var selectedcarmake = $('#<%=ddlCarMake.ClientID%>').val();
                var selectedcarmodel = $('#<%=ddlModelBodyCCDoor.ClientID%>').val();

                //set message
                var _strSelectedCarModel;
                var _strAutoMan = "";
                var _strSelectedCarModelSplit = $('#<%=ddlModelBodyCCDoor.ClientID%> option:selected').text().split(',');

                if (_strSelectedCarModelSplit.length == 5)
                    _strSelectedCarModel = _strSelectedCarModelSplit[0] + "," + _strSelectedCarModelSplit[1];
                else
                    _strSelectedCarModel = _strSelectedCarModelSplit[0];

                if (_strSelectedCarModel.search(" Auto ") != -1) {
                    _strSelectedCarModel = _strSelectedCarModel.replace(" Auto ", " ");
                    _strAutoMan = " <span style='font-size:80%;font-style: italic;'>(Auto)</span>";
                }
                else if (_strSelectedCarModel.search(" Man ") != -1) {
                    _strSelectedCarModel = _strSelectedCarModel.replace(" Man ", " ");
                    _strAutoMan = " <span style='font-size:80%;font-style: italic;'>(Manual)</span>";
                }
                _strSelectedCarModel = _strSelectedCarModel.replace("_", " ");

                $('#<%=divInteractMessage.ClientID %>').removeAttr("style").css('visibility', 'visible');
                $('#<%=lblInteractMessage.ClientID %>').html(_strSelectedCarModel + _strAutoMan);
                $('#<%=lblInteractMatches.ClientID %>').text('<%=GetGlobalResourceObject("General", "CQClickGetQuote")%>');
                $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '-54px');

                //set value to hiddenfield
                $('#<%=hidModelBodyCCDoor.ClientID%>').val($('#<%=ddlModelBodyCCDoor.ClientID%>').val());
                var carmodelname = $('#<%=ddlModelBodyCCDoor.ClientID%>' + ' option:selected').text();
                $('#<%=hidModelBodyCCDoorName.ClientID%>').val(carmodelname);

                $('#<%=ddlModelBodyCCDoor.ClientID%>').removeClass("validationError");


                $.ajax({
                    type: "POST",
                    url: '<%= ConfigurationManager.AppSettings["TH.HostName"].ToString()%>' + 'car-insurance/get-car-details.asmx/GetCarQuoteCountLast30DaysByCarModel',
                    data: "{'CarMake': '" + selectedcarmake + "', 'CarModel': '" + selectedcarmodel + "'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(msg) {
                        var j = jQuery.parseJSON(msg.d);
                        $('#<%=lblQuotes.ClientID %>').text(j[0].quoteCount);
                        $('#<%=divMotorBrand.ClientID %>').removeClass().addClass(j[0].carBrand);
                    },
                    error: function(data) {
                        alert('Network connection failed. Please try again!')
                    }
                });
            }
            else {
                //set value to hiddenfield
                $('#<%=hidModelBodyCCDoor.ClientID%>').val('-1');
                $('#<%=hidModelBodyCCDoorName.ClientID%>').val('');

                //set message
                $('#<%=lblInteractMatches.ClientID %>').html('<%=GetGlobalResourceObject("General", "CQFound")%>' + " <b>" + ($('#<%=ddlModelBodyCCDoor.ClientID%> option').size() - 1) + "</b> " + '<%=GetGlobalResourceObject("General", "CQMatches")%>');
                $('#<%=lblInteractMessage.ClientID %>').text('');
                $('#<%=divInteractMessage.ClientID %>').removeAttr("style").css('visibility', 'hidden');
                $('#<%=lblInteractMatches.ClientID %>').removeAttr("style").css('margin-left', '0');


            }
        });

        function CheckOptionValidationCss() {
            if ($('#<%=hidCarMake.ClientID%>').val() == "-1") {
                $('#<%=ddlCarMake.ClientID%>').addClass("validationError");
            }
            if ($('#<%=hidModelBodyCCDoor.ClientID%>').val() == "-1") {
                $('#<%=ddlModelBodyCCDoor.ClientID%>').addClass("validationError");
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" runat="Server">
</asp:Content>
